Release 10.1A: OpenEdge Development:
Programming Interfaces


4GL to XML Schema data type mappings

Table D–1 shows the default mapping between 4GL data types and XML Schema data types used with the read and write XML methods of temp-tables and ProDataSets. The third column shows the Progress-specific XML Schema data type attribute which is an extension to the basic XML Schema. This attribute is used for Progress 4GL data types that are not the default for the XML Schema data type.

This table contains the most common XML Schema data types and their corresponding Progress 4GL data types.

Table D–1: 4GL data types mapped to XML Schema data types
4GL type
XML Schema type attribute
Progress-specific XML Schema data type attribute
BLOB
base64Binary
prodata:blob
CHARACTER
string
 
CLOB
string
prodata:clob
COM-HANDLE
long
prodata:comHandle
DATE
date
 
DATETIME
dateTime
prodata:dateTime
DATETIME-TZ
dateTime
 
DECIMAL
decimal
 
INTEGER (32 bit)
int
 
LOGICAL
boolean
 
RAW
base64Binary
 
RECID (32 or 64 bit)
long
prodata:recid
ROWID
base64Binary
prodata:rowid
HANDLE/WIDGET-HANDLE
long
prodata:handle

Note: You have some control over default data type mappings. The READ-XML( ) and READ-XMLSCHEMA( ) methods have override-default-mapping and field-type-mapping options. See Chapter 22 "Reading and Writing XML Using Temp-Tables and ProDataSets" for more information.

There are many other XML Schema data types that could appear in an XML Schema definition. Progress maps these data types but also preserves the original XML Schema type in the XML-DATA-TYPE attribute of the buffer-field object. When the WRITE-XML( ) and WRITE-XMLSCHEMA( ) methods encounter buffer-fields with these values, they write the original XML Schema data type out to the XML Schema.

Table D–2 lists the other XML Schema data types and the 4GL data type they map to.

Table D–2: Other XML Schema types and 4GL data type mappings
XML Schema Type (type) Attribute
4GL Type
anyURI  
CHARACTER 
byte 
INTEGER 
double 
CHARACTER 
duration 
CHARACTER 
ENTITIES 
CHARACTER 
ENTITY 
CHARACTER 
float 
CHARACTER 
gDay 
CHARACTER 
gMonth 
CHARACTER 
gMonthDay 
CHARACTER 
gYear 
CHARACTER 
gYearMonth 
CHARACTER 
hexBinary 
RAW 
ID 
CHARACTER 
IDREF 
CHARACTER 
IDREFS 
CHARACTER 
integer 
DECIMAL 
language 
CHARACTER 
long 
DECIMAL 
Name 
CHARACTER 
NCName 
CHARACTER 
negativeInteger 
DECIMAL 
NMTOKEN 
CHARACTER 
NMTOKENS 
CHARACTER 
nonNegativeInteger 
DECIMAL 
nonPositiveInteger 
DECIMAL 
normalizedString 
CHARACTER 
NOTATION 
CHARACTER 
positiveInteger 
DECIMAL 
QName 
CHARACTER 
short 
INTEGER 
time 
INTEGER 
token 
CHARACTER 
unsignedByte 
INTEGER 
unsignedInt 
DECIMAL 
unsignedLong 
DECIMAL 
unsignedShort 
INTEGER 


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095